/*
 * exceptions.h
 *
 *  Created on: Sep 7, 2011
 *      Author: anonovermind <anonovermind@gmail.com>
 */

#ifndef EXCEPTIONS_H_
#define EXCEPTIONS_H_

#include <stdexcept>

namespace Wishmaster2
{
namespace Network
{
	class Exception : public std::runtime_error
	{
	public:
		Exception(const std::string& msg) : std::runtime_error(msg) {}
		virtual ~Exception() throw() {}
	};

	class UrlParsingException : public Exception
	{
	public:
		UrlParsingException(const std::string& msg) : Exception(msg) {}
		virtual ~UrlParsingException() throw() {}
	};

	class ProtocolException : public Exception
	{
	public:
		ProtocolException(const std::string& msg) : Exception(msg) {}
		virtual ~ProtocolException() throw() {}
	};

	class InvalidUrlException : public Exception
	{
	public:
		InvalidUrlException(const std::string& msg) : Exception(msg) {}
		virtual ~InvalidUrlException() throw() {}
	};

	class SerializationException : public Exception
	{
	public:
		SerializationException(const std::string& msg) : Exception(msg) {}
		virtual ~SerializationException() throw() {}
	};

	class DeserializationException : public Exception
	{
	public:
		DeserializationException(const std::string& msg) : Exception(msg) {}
		virtual ~DeserializationException() throw() {}
	};
}
}



#endif /* EXCEPTIONS_H_ */
